﻿using System.ComponentModel;

namespace CefWebrtcDemo.wpf
{
    public class DemoWindowViewModel : INotifyPropertyChanged
    {
        private bool _isBrowserVisible;
        public bool IsBrowserVisible
        {
            get => _isBrowserVisible;
            set
            {
                if (_isBrowserVisible != value)
                {
                    _isBrowserVisible = value;
                    OnPropertyChanged(nameof(IsBrowserVisible));
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}